package com.homedo.microservice.open.service.gateway.manager.web.autoconfig;

import com.homedo.microservice.open.service.gateway.manager.web.filter.SetGategayInfoFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean setGategayInfoFilter() {
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();

        filterRegistrationBean.setFilter(new SetGategayInfoFilter());
        filterRegistrationBean.addUrlPatterns("/*");
        filterRegistrationBean.setName("setGategayInfoFilter");
//        filterRegistrationBean.setOrder(6);

        return filterRegistrationBean;
    }
}
